<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body{
      margin: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-around;
      height: 100vh;
    }
    .image-slider{
      position: relative;
      font-size: 0;
    }
    .image-slider > div{
      position: absolute;
      top: 0; bottom: 0; left: 0;
      width: 50%;
      max-width: 100%;
      border-right: 1px solid white;
      overflow: hidden;
      resize: horizontal;
    }
    .image-slider > div::after{
      content: "";
      position: absolute;
      right: 1px;
      bottom: 1px;
      width: 15px;
      height: 15px;
      background: linear-gradient(-45deg, white 50%, transparent 0);
    }
    .image-slider img{
      display: inline-block;
      user-select: none;
    }
  </style>
</head>
<body>
  <div class="image-slider">
    <div>
      <img src="http://csssecrets.io/images/adamcatlace-before.jpg" alt="Before" />
    </div>
    <img src="http://csssecrets.io/images/adamcatlace.jpg" alt="After" />
  </div>
</body>
</html>